﻿using System.Windows.Forms;
using CloudShot.Properties;
using CloudShot.Utils;

namespace CloudShot.Logic
{
  internal static class AppCursors
  {
    public static Cursor Default
    {
      get { return Cursors.Default; }
    }

    private static Cursor _figureDragCursor;
    public static Cursor FigureDragCursor
    {
      get { return _figureDragCursor ?? (_figureDragCursor = User32.CreateCursor(Resources.cursor_hand_drag, 4, 8)); }
    }

    private static Cursor _figureOverCursor;
    public static Cursor FigureOverCursor
    {
      get { return _figureOverCursor ?? (_figureOverCursor = User32.CreateCursor(Resources.cursor_hand_over, 9, 1)); }
    }

    public static Cursor CropDragCursor
    {
      get { return FigureDragCursor; }
    }

    public static Cursor CropOverCursor
    {
      get { return FigureOverCursor; }
    }

    private static Cursor _lineToolCursor;
    public static Cursor LineToolCursor
    {
      get { return _lineToolCursor ?? (_lineToolCursor = User32.CreateCursor(Resources.line_tool, 0, 0)); }
    }

    private static Cursor _arrowToolCursor;
    public static Cursor ArrowToolCursor
    {
      get { return _arrowToolCursor ?? (_arrowToolCursor = User32.CreateCursor(Resources.arrow_tool, 0, 0)); }
    }

    private static Cursor _ellipseToolCursor;
    public static Cursor EllipseToolCursor
    {
      get { return _ellipseToolCursor ?? (_ellipseToolCursor = User32.CreateCursor(Resources.ellipse_tool, 0, 0)); }
    }

    private static Cursor _circleToolCursor;
    public static Cursor CircleToolCursor
    {
      get { return _circleToolCursor ?? (_circleToolCursor = User32.CreateCursor(Resources.circle_tool, 0, 0)); }
    }

    private static Cursor _rectangleToolCursor;
    public static Cursor RectangleToolCursor
    {
      get { return _rectangleToolCursor ?? (_rectangleToolCursor = User32.CreateCursor(Resources.rectangle_tool, 0, 0)); }
    }

    private static Cursor _frameToolCursor;
    public static Cursor FrameToolCursor
    {
      get { return _frameToolCursor ?? (_frameToolCursor = User32.CreateCursor(Resources.frame_tool, 0, 0)); }
    }

    private static Cursor _textToolCursor;
    public static Cursor TextToolCursor
    {
      get { return _textToolCursor ?? (_textToolCursor = User32.CreateCursor(Resources.text_tool, 0, 0)); }
    }

    private static Cursor _cropToolCursor;
    public static Cursor CropToolCursor
    {
      get { return _cropToolCursor ?? (_cropToolCursor = User32.CreateCursor(Resources.crop_tool, 8, 8)); }
    }   

    //public static Cursor CropToolCursor
    //{
    //  get { return Cursors.Cross; }
    //}  

    public static Cursor SizeNWSE
    {
      get { return Cursors.SizeNWSE; }
    }

    public static Cursor SizeNS
    {
      get { return Cursors.SizeNS; }
    }

    public static Cursor SizeNESW
    {
      get { return Cursors.SizeNESW; }
    }

    public static Cursor SizeWE
    {
      get { return Cursors.SizeWE; }
    }

    public static Cursor SizeAll
    {
      get { return Cursors.SizeAll; }
    }
  }
}